/*
 * @lc app=leetcode.cn id=74 lang=cpp
 *
 * [74] 搜索二维矩阵
 */

// @lc code=start
class Solution
{
public:
  bool searchMatrix(vector<vector<int>>& matrix, int target)
  {
    for (auto& row : matrix) {
      if (binary_search(row.begin(), row.end(), target))
        return true;
    }
    return false;
  }
};
// @lc code=end
